import request from "@/utils/request";

export function getList(method, data) {
  if (method == "post") {
    return request({
      url: "/elder",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/elder",
      method: method,
      params: data,
    });
  }
}
//疾病治疗-- 人员列表
export function yifastelder(method, data) {
  if (method == "post") {
    return request({
      url: "/yifastelder",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/yifastelder",
      method: method,
      params: data,
    });
  }
}
//疾病治疗--添加健康状况
export function yifasthealth(method, data) {
  if (method == "post") {
    return request({
      url: "/yifasthealth",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/yifasthealth",
      method: method,
      params: data,
    });
  }
}

// 疾病治疗--病历列表
export function yifastcase(method, data) {
  if (method == "post") {
    return request({
      url: "/yifastcase",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/yifastcase",
      method: method,
      params: data,
    });
  }
}

//慢性病管理-- 人员列表
export function yislowelder(method, data) {
  if (method == "post") {
    return request({
      url: "/yislowelder",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/yislowelder",
      method: method,
      params: data,
    });
  }
}
//慢性病管理--添加健康状况
export function yislowhealth(method, data) {
  if (method == "post") {
    return request({
      url: "/yislowhealth",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/yislowhealth",
      method: method,
      params: data,
    });
  }
}

// 慢性病管理 -- 病历列表
export function yislowcase(method, data) {
  if (method == "post") {
    return request({
      url: "/yislowcase",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/yislowcase",
      method: method,
      params: data,
    });
  }
}

//康复训练-- 人员列表
export function yitrainelder(method, data) {
  if (method == "post") {
    return request({
      url: "/yitrainelder",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/yitrainelder",
      method: method,
      params: data,
    });
  }
}
//康复训练--添加健康状况
export function yitrainhealth(method, data) {
  if (method == "post") {
    return request({
      url: "/yitrainhealth",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/yitrainhealth",
      method: method,
      params: data,
    });
  }
}

// 康复训练 -- 病历列表
export function yitraincase(method, data) {
  if (method == "post") {
    return request({
      url: "/yitraincase",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/yitraincase",
      method: method,
      params: data,
    });
  }
}

//心理慰藉-- 人员列表
export function yicomfortelder(method, data) {
  if (method == "post") {
    return request({
      url: "/yicomfortelder",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/yicomfortelder",
      method: method,
      params: data,
    });
  }
}
//心理慰藉--添加健康状况
export function yicomforthealth(method, data) {
  if (method == "post") {
    return request({
      url: "/yicomforthealth",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/yicomforthealth",
      method: method,
      params: data,
    });
  }
}

// 心理慰藉 -- 病历列表
export function yicomfortcase(method, data) {
  if (method == "post") {
    return request({
      url: "/yicomfortcase",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/yicomfortcase",
      method: method,
      params: data,
    });
  }
}

//安宁服务-- 人员列表
export function yicalmelder(method, data) {
  if (method == "post") {
    return request({
      url: "/yicalmelder",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/yicalmelder",
      method: method,
      params: data,
    });
  }
}
//安宁服务--添加健康状况
export function yicalmhealth(method, data) {
  if (method == "post") {
    return request({
      url: "/yicalmhealth",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/yicalmhealth",
      method: method,
      params: data,
    });
  }
}

// 安宁服务 -- 病历列表
export function yicalmcase(method, data) {
  if (method == "post") {
    return request({
      url: "/yicalmcase",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/yicalmcase",
      method: method,
      params: data,
    });
  }
}

export function getOlder(method, data) {
  if (method == "post") {
    return request({
      url: "/elder",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/elder",
      method: method,
      params: data,
    });
  }
}
export function getFamily(method, data) {
  if (method == "post") {
    return request({
      url: "/elderfamily",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/elderfamily",
      method: method,
      params: data,
    });
  }
}
export function getHealth(method, data) {
  if (method == "post") {
    return request({
      url: "/elderhealth",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/elderhealth",
      method: method,
      params: data,
    });
  }
}
export function getBedset(method, data) {
  if (method == "post") {
    return request({
      url: "/elderbedset",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/elderbedset",
      method: method,
      params: data,
    });
  }
}
export function getFees(method, data) {
  if (method == "post") {
    return request({
      url: "/elderfees",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/elderfees",
      method: method,
      params: data,
    });
  }
}
export function changeFormal(method, data) {
  if (method == "post") {
    return request({
      url: "/change/livestatus",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/change/livestatus",
      method: method,
      params: data,
    });
  }
}
export function leave(method, data) {
  if (method == "post") {
    return request({
      url: "/elder/leave",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/elder/leave",
      method: method,
      params: data,
    });
  }
}
export function feesDetail(method, data) {
  if (method == "post") {
    return request({
      url: "/fees",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/fees",
      method: method,
      params: data,
    });
  }
}
export function cancelFees(method, data) {
  if (method == "post") {
    return request({
      url: "/fees/invalid",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/fees/invalid",
      method: method,
      params: data,
    });
  }
}
export function billList(method, data) {
  if (method == "post") {
    return request({
      url: "/bill",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/bill",
      method: method,
      params: data,
    });
  }
}
export function setNoBill(method, data) {
  if (method == "post") {
    return request({
      url: "/bill/invalid",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/bill/invalid",
      method: method,
      params: data,
    });
  }
}
export function payBill(method, data) {
  if (method == "post") {
    return request({
      url: "/bill/giveback",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/bill/giveback",
      method: method,
      params: data,
    });
  }
}
export function setRecover(method, data) {
  if (method == "post") {
    return request({
      url: "/bill/recover",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/bill/recover",
      method: method,
      params: data,
    });
  }
}

export function feeslist(method, data) {
  if (method == "post") {
    return request({
      url: "/elder/feeslist",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/elder/feeslist",
      method: method,
      params: data,
    });
  }
}
export function doorServeList(method, data) {
  if (method == "post") {
    return request({
      url: "/serviceelder",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/serviceelder",
      method: method,
      params: data,
    });
  }
}
export function servicerList(method, data) {
  if (method == "post") {
    return request({
      url: "/servicer",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/servicer",
      method: method,
      params: data,
    });
  }
}
export function assigElder(method, data) {
  if (method == "post") {
    return request({
      url: "/service/assign",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/service/assign",
      method: method,
      params: data,
    });
  }
}
export function findAllBill(method, data) {
  if (method == "post") {
    return request({
      url: "/bill/list",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/bill/list",
      method: method,
      params: data,
    });
  }
}
export function assignlist(method, data) {
  if (method == "post") {
    return request({
      url: "/service/assignlist",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/service/assignlist",
      method: method,
      params: data,
    });
  }
}
export function servicerAssignlist(method, data) {
  if (method == "post") {
    return request({
      url: "/servicer/assignlist",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/servicer/assignlist",
      method: method,
      params: data,
    });
  }
}
export function deleteAssignlist(method, data) {
  if (method == "post") {
    return request({
      url: "/service/assigndelete",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/service/assigndelete",
      method: method,
      params: data,
    });
  }
}
export function getServiceList(method, data) {
  if (method == "post") {
    return request({
      url: "/service/list1",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/service/list1",
      method: method,
      params: data,
    });
  }
}

export function uploadImg(method, data) {
  if (method == "post") {
    return request({
      url: "/upload",
      method: method,
      headers: {
        'Content-Type': 'multipart/form-data'
      },
      data,
    });
  } else {
    return request({
      url: "/upload",
      method: method,
      params: data,
    });
  }
}


export function getidcardapi(method, data) {
  if (method == "post") {
    return request({
      url: "/idcardapi",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/idcardapi",
      method: method,
      params: data,
    });
  }
}


//获取试题
export function gethealthtestlist(method, data) {
  if (method == "post") {
    return request({
      url: "/elderhealthtest/list",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/elderhealthtest/list",
      method: method,
      params: data,
    });
  }
}


//新建测评报告
export function gethealthtestinfo(method, data) {
  if (method == "post") {
    return request({
      url: "/elderhealthtest/info",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/elderhealthtest/info",
      method: method,
      params: data,
    });
  }
}



//上传或者修改答案
export function posthealthtestoption(method, data) {
  if (method == "post") {
    return request({
      url: "/elderhealthtest/option",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/elderhealthtest/option",
      method: method,
      params: data,
    });
  }
}


//获取老人测评记录
export function getelderhealthtest(method, data) {
  if (method == "post") {
    return request({
      url: "/elderhealthtest",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/elderhealthtest",
      method: method,
      params: data,
    });
  }
}

//账单列表信息 get delete post
export function getebill(method, data) {
  if (method == "post") {
    return request({
      url: "/ebill",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/ebill",
      method: method,
      params: data,
    });
  }
}

//账单总汇
export function ebillresult(params) {
  return request({
    url: "/ebill/result",
    method: "get",
    params,
  });
}


//重新入住
export function elderback(params) {
  return request({
    url: "/elder/back",
    method: "get",
    params,
  });
}


//残疾老人-列表 get delete post
export function getcanjielder(method, data) {
  if (method == "post") {
    return request({
      url: "/canjielder",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/canjielder",
      method: method,
      params: data,
    });
  }
}
